{include file="common/header.tpl"}
<section class="main">	
    <article class="right-col">
    		<h2><a href="{$back}">{$language.title.personal}</a> &raquo; {$language.ahref.edit}</h2>
            <form name="frmAdd" id="frmAdd" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}personal/saveedit" class="ui">                   	
        	<ul>
               <li>
               		{if isset($intPersonalId)}
               		<input type="hidden" name="personalid" id="personalid" value="{$intPersonalId}" />
                    {/if}
               </li>
                {if isset($smarty.session.PERSONAL_ERROR)}
                    <li class="error">
                    	{include file="common/error.tpl" dataSession=$smarty.session.PERSONAL_ERROR}                        
                    </li>
                {/if}                 
                <li>
                    <label for="first">{$language.label.firstname}:</label>
                     <div class="txt">
                	      <input type="text" class="text" name="first" id="first" value="{if isset($row)}{$row->firstname}{/if}" autocomplete="false" />
      	             </div>
                </li>
                <li>
                    <label for="last">{$language.label.lastname}:</label>
                     <div class="txt">
                	      <input type="text" class="text" name="last" id="last" value="{if isset($row)}{$row->lastname}{/if}" autocomplete="false"/>
      	             </div>
                </li>
                <li>
                    <label for="nickname">{$language.label.nickname}:</label>
                     <div class="txt">
                	      <input type="text" class="text" name="nickname" id="nickname" value="{if isset($row)}{$row->nickname}{/if}" autocomplete="false"/>
      	             </div>
                </li>
                <li>
                    <label for="birth">{$language.label.birth}:</label>
                     <div class="txt">
                	      <input type="text" class="text" name="birth" id="birth" value="{if isset($row)}{$row->birthdate}{/if}" autocomplete="false" />
      	             </div>
                </li>
                {if isset($arrNational)}
                    <li>
                        <label for="place">{$language.label.place}:</label>
                         <div class="select">
                            <select name="place">
                            	{html_options options=$arrNational selected=$row->place_of_birth}                                
                            </select>                    	      
          	             </div>
                    </li>
                {/if}
                 <li>
                	<label for="logo">{$language.label.avatar}:</label>
                    <div class="txt">
                        <input type="text" name="link" id="link" value="" onkeypress="javascript:resetLogo(1);"/>	 
	                	<input type="file" class="text" name="logo" id="logo" value="" autocomplete="false" onchange="javascript:resetLogo(2);"/>
                	</div>
                </li>
                <li>
                	<div class="txt">
                	{if isset($row)}{get_img_tag path=$row->avatar}{/if}
                    </div>
                </li>
                <li>
                	<label for="sshort">{$language.label.short}:</label>
                    <div class="txt">
                        <input type="text" name="sshort" id="sshort" value="{if isset($row)}{$row->short|escape}{/if}"/>	                
                	</div>
                </li>
                <li>
                	<label for="description">{$language.label.description}:</label>
                    <div class="area">
                        <textarea rows="5" cols="50" name="description" id="description" >{if isset($row)}{$row->description|escape}{/if}</textarea>	               
                	</div>                    
                </li>
                <li>
                	<label for="tag">{$language.label.tag}:</label>
                    <div class="txt">
	                	<input type="text" class="text" name="tag" id="tag" value="{if isset($row)}{$row->tag|escape}{/if}" autocomplete="false" />
                	</div>
                </li>
                {if isset($arrType) }   
                <li>
                    <div class="chk">
                        <ul>
                            {foreach key=i item=item from=$arrType}
                                <li>
                                {if $i == $row->type}
                               		 <input type="checkbox" name="type" id="type{$i}" value="{$item}" checked="true">
                                {else}
                                	<input type="checkbox" name="type" id="type{$i}" value="{$item}">
                                {/if}
                                </li>
                            {/foreach}
                        </ul>
                    </div>
                </li>
                {/if}                                                                   
                <li>
                    <label>{$language.label.extra}</label>                                                    
                    {include file="common/table-feature.tpl"}
                    <input type="hidden" name="feature" id="feature" value="" />
                </li>                     
                <li>
                    <button type="submit"><strong>{$language.btn.save}</strong></button>
                    <button type="reset"><strong>{$language.btn.cancel}</strong></button>
                </li>
            </ul>
        </form>
    </article>
<section>
{include file="common/footer.tpl"}
                
